package com.lzl.controller;

import com.lzl.responese.ResponseResult;
import com.lzl.responese.TokenResponse;
import com.lzl.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * //TODO
 *
 * @author zhaolinlin
 * @description //TODO
 * @createTime 2022/8/11 21:41
 */
@RestController
public class TokenController {

    @Autowired
    private TokenService tokenService;

    @RequestMapping("/refresh-token")
    public ResponseResult refreshToken(@RequestBody TokenResponse tokenResponse){

        return tokenService.refreshToken(tokenResponse.getRefreshToken());
    }

}
